package com.ln.lnzw.adapter;

import android.support.annotation.Nullable;
import android.support.v7.widget.CardView;
import android.view.ViewGroup;
import android.widget.RelativeLayout;

import com.blankj.utilcode.util.ScreenUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ln.lnzw.R;
import com.ln.lnzw.bean.CategoryBean;
import com.ln.lnzw.bean.ServiceCategoryBean;

import java.util.List;

/**
 * 作者 : wlt
 * 创建时间:  2018-04-26
 * QQ : 1346947404
 * 邮箱:wanglt_android@163.com
 * 类说明:
 * In me the tiger sniffs the rose
 */

public class ServerSubFeileiAdapter extends BaseQuickAdapter<CategoryBean,BaseViewHolder> {


    private CardView cv_subscribe_item;

    public ServerSubFeileiAdapter(int layoutResId, @Nullable List<CategoryBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CategoryBean item) {




        cv_subscribe_item = helper.getView(R.id.cv_subscribe_item);

        ViewGroup.LayoutParams params1 = cv_subscribe_item.getLayoutParams();
        params1.width = (ScreenUtils.getScreenWidth()-80)/3;
        params1.height = params1.width*13/34;
        cv_subscribe_item.setLayoutParams(params1);



        helper.setText(R.id.tv_service_appname,item.getAppName());


    }
}
